/**
 * 
 */
package com.dovgopoly.carlogbook.model.user;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.dovgopoly.carlogbook.model.AbstractBaseEntity;

/**
 * @author e.dovgopoliy
 * 
 */
@Entity
@Table(name = "user")
public class User extends AbstractBaseEntity {

	private static final long serialVersionUID = -2278988290524347177L;

	private String username;
	private String password;
	private String passwordMD5;
	private Date passwordChanged;
	private String passwordEmailToken;
	private Date lastLoginDate;
	private Long loginCount;
	private Date registrationDate;
	private Boolean deleted;
	private Date deletedDate;
	private Boolean blocked;
	private Date blockedDate;
	private String ipAddress;

	@Column(name = "username", nullable = false, length = 64)
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password", nullable = false, length = 64)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "password_md5", nullable = false, length = 32)
	public String getPasswordMD5() {
		return passwordMD5;
	}

	public void setPasswordMD5(String passwordMD5) {
		this.passwordMD5 = passwordMD5;
	}

	@Column(name = "password_changed")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getPasswordChanged() {
		return passwordChanged;
	}

	public void setPasswordChanged(Date passwordChanged) {
		this.passwordChanged = passwordChanged;
	}

	@Column(name = "password_email_token", length = 10)
	public String getPasswordEmailToken() {
		return passwordEmailToken;
	}

	public void setPasswordEmailToken(String passwordEmailToken) {
		this.passwordEmailToken = passwordEmailToken;
	}

	@Column(name = "last_login_date")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	@Column(name = "login_count", length = 20)
	public Long getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(Long loginCount) {
		this.loginCount = loginCount;
	}

	@Column(name = "registration_date")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getRegistrationDate() {
		return registrationDate;
	}

	public void setRegistrationDate(Date registrationDate) {
		this.registrationDate = registrationDate;
	}

	@Column(name = "deleted")
	public Boolean getDeleted() {
		return deleted;
	}

	public void setDeleted(Boolean deleted) {
		this.deleted = deleted;
	}

	@Column(name = "deleted_date")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getDeletedDate() {
		return deletedDate;
	}

	public void setDeletedDate(Date deletedDate) {
		this.deletedDate = deletedDate;
	}

	@Column(name = "blocked")
	public Boolean getBlocked() {
		return blocked;
	}

	public void setBlocked(Boolean blocked) {
		this.blocked = blocked;
	}

	@Column(name = "blocked_date")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getBlockedDate() {
		return blockedDate;
	}

	public void setBlockedDate(Date blockedDate) {
		this.blockedDate = blockedDate;
	}

	@Column(name = "ip_address", length = 39)
	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

}
